Chapter 9 Objects and Classes

 

Key Points

 

1.      Object-oriented programming enables you to develop large-scale software effectively.

2.      A class defines the properties and behaviors for objects.

3.      Classes are definitions for objects and objects are created from classes.

4.      A Constructor is invoked to create an object and are a special kind of function with three properties:

a.   Constructors must have the same name as the class

b.   Constructors do not have a return type, not even void

c.    Constructors are invoked when an object is created. Constructors play the role of initializing objects.

5.      An object's data and functions can be accessed through the dot (.) operator via the object's name.

6.      Separating class definition from class implementation makes the class easy to maintain.

7.      Inclusion guard prevents header files from being included multiple times.

8.      You can define short functions as in line functions to improve performance.

9.      Making data fields private protects data and makes the class easy to maintain.

10.The scope of data fields is an entire class regardless of where the data fields are declared.

11.Class abstraction is the separation of class implementation from the use of a class. The details of implementation are encapsulated and hidden from the user. This is known as class encapsulation.

 

Chapter 10 Object-Oriented Thinking

 

Key Points

 

1.       

 

Chapter 11

 

Key Points

 

1.    

 

 

Office Location:

Jim Carrier, Ph.D.

Professor - Computer Science

Guilford Technical Community College

Applied Technology, AT-123-6

601 E. Main Street, Jamestown, NC 27282

E-mail: jacarrier@gtcc.edu

Direct: 336.334.4822 ext. 50078

Mailing Address: PO Box 309, Jamestown, NC 27282

www.gtcc.edu